﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using Core.BusinessLogic.Interfaces;
using Core.DataAccess.IRepositories;
using Core.DataAccess;
using Core.Common;

namespace Core.BusinessLogic
{
    [Export(typeof(ICommentService))]
    public class CommentService : ICommentService
    {
        [Import]
        private ICommentRepository _repository;

        public CommentService()
        {
            MEFManager.Compose(this);
        }

        public void SaveComment(Comment commentObj)
        {
            _repository.SaveComment(commentObj);
        }


        public List<Comment> GetCommentBySytemObject(int sytemObjectID, long sytemObjectRecordID)
        {
            return _repository.GetCommentBySytemObject(sytemObjectID, sytemObjectRecordID);
        }
    }
}
